1. Field of the Invention
Methods and apparatuses consistent with the present invention relate to encoding or decoding an image, and more particularly, to a method and apparatus for encoding or decoding an image unit including n-bit pixel values.
2. Description of the Related Art
An image is lossy-compressed according to conventional video codec standards, such as MPEG-1, MPEG-2, MPEG-4, and H.264/MPEG-4 Advanced Video Coding (AVC), which have been suggested for video compression. That is, an image is compressed at a high rate of compression while disregarding a loss that occurs during the compression encoding.
However, as demand for high-resolution images has increased, much attention has been paid to the development of a method and apparatus for losslessly encoding/decoding an image. In a method of losslessly encoding/decoding an image, the original image is losslessly compressed but should also be compressed at a high rate so that an encoding/decoding apparatus may be designed in which the sizes of a data bus and memory necessary for image data processing are reduced. However, if a complex compression algorithm is used for compression at a high rate, system complexity increases.